package cn.btks.backstagemanage.bu.repository;

import cn.btks.backstagemanage.bu.pojo.BuYqsthj;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author lijun
 * @Date 2021/1/7 11:21
 */
@Repository
public interface YqsthjRepository extends JpaRepository<BuYqsthj,Long>, JpaSpecificationExecutor<BuYqsthj> {

    @Query(value = "SELECT * FROM bu_yqsthj WHERE " +
            "pqmc LIKE CONCAT('%', ?1, '%') OR " +
            "ss LIKE CONCAT('%', ?1, '%') OR " +
            "jcsj LIKE CONCAT('%', ?1, '%') OR " +
            "jcdmc LIKE CONCAT('%', ?1, '%') OR " +
            "jcyz LIKE CONCAT('%', ?1, '%') OR " +
            "jcndfw LIKE CONCAT('%', ?1, '%')",
            nativeQuery = true)
    List<BuYqsthj> yqsthjList(String keyWord);


}
